import Home from "../view/Home/Home"
import Login from "../view/login/Login"
import Register from "../view/register/Register"
import Shou from "../view/Home/Shou/Shou"
import Classify from "../view/Home/classify/Classify"
import Cart from "../view/Home/cart/Cart"
import My  from "../view/Home/my/My"
import Detail from "../view/detail/Detail"
export interface routerItem {
    tit?:string,
    path:string,
    component?:any,
    redirect?:any,
    children?:any
}
let routes:routerItem[] =[
    {
        path:"/home",
        component:Home,
        children:[
            {
                tit:"首页",
                path:"/home/shou",
                component:Shou
            },
            {
                tit:"精选",
                path:"/home/classify",
                component:Classify
            },
            {
                tit:"购物车",
                path:"/home/cart",
                component:Cart
            },
            {
                tit:"我的",
                path:"/home/my",
                component:My
            },
            {
                path:"/home/detail/:id",
                component:Detail
            },
            {
                path:"/home",
                redirect:"/home/classify"
            }
        ]
    },
    {
        path:"/login",
        component:Login
    },
    {
        path:"/register",
        component:Register
    },
    {
        path:"/",
        redirect:"/home"
    }
]

export default routes
